obj-m := sr501_irq.o
obj-m += sr501_threadirq.o
obj-m += sr501_kernelthread.o
obj-m += sr501_tasklet.o
obj-m += sr501_workqueue.o
obj-m += sr501_timer.o
obj-m += sr501_hrtimer.o
# obj-m += sr501_completion.o

CURRENT_PATH := $(shell pwd)

# PLATFORM := IMX6ULL
PLATFORM := WSL 

ifeq ($(PLATFORM),IMX6ULL)
	LINUX_KERNAL_PATH := /home/book/100ask_imx6ull-sdk/Linux-4.9.88
else
	LINUX_KERNAL:=$(shell uname -r)
	LINUX_KERNAL_PATH:=/usr/src/linux-headers-$(LINUX_KERNAL)
endif

all:
	make -C $(LINUX_KERNAL_PATH) M=$(CURRENT_PATH) modules

clean:
	make -C $(LINUX_KERNAL_PATH) M=$(CURRENT_PATH) clean